package com.shelpe.services.scheduler.item.creative;

import org.springframework.batch.item.ItemReader;
import org.springframework.batch.item.NonTransientResourceException;
import org.springframework.batch.item.ParseException;
import org.springframework.batch.item.UnexpectedInputException;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.shelpe.services.scheduler.po.Adgroups;
import com.shelpe.services.scheduler.repository.AdgroupsRepository;

@Component("creativeReader")
public class CreativeReaderImpl implements ItemReader<Adgroups>{
	
	@Autowired
	private AdgroupsRepository adRep;
	
	@Override
	public Adgroups read()
			throws Exception, UnexpectedInputException, ParseException, NonTransientResourceException {
		// TODO Auto-generated method stub
		return adRep.findOne(0L);
	}

}
